package com.example.todoapp.http.responsestruct; // 包路径正确

import lombok.Data;

@Data
public class ResponseResult<T> { // 类名必须与文件名一致
    private int code;
    private String message;
    private T data;

    public ResponseResult(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    // 原有静态工厂方法
    public static <T> ResponseResult<T> success(T data) {
        return new ResponseResult<>(0, "success", data);
    }
}